package com.office.automate.validation.framework;

import java.util.HashMap;

import com.office.automate.exception.framework.FrontierVisibleException;

public class BaseValidator {

	private HashMap<String, FrontierVisibleException> fieldValidationErrors;

	public BaseValidator() {
		fieldValidationErrors = new HashMap<String, FrontierVisibleException>();
	}

	public HashMap<String, FrontierVisibleException> getFieldValidationErrors() {
		return fieldValidationErrors;
	}

	public boolean isValidationErrorsExist() {
		return fieldValidationErrors.size() > 0;
	}

	protected void addFieldValidationException(String aFieldName, FrontierVisibleException anException) {
		fieldValidationErrors.put(aFieldName, anException);
	}

}
